import Vue from 'vue'
import Router from 'vue-router'
const routerPush=Router.prototype.push

Router.prototype.push = function push(location){

return routerPush.call(this,location).catch(error=>error)

}
Vue.use(Router)

import Home from '@/view/home'
import documention from '@/view/documention'
import download from '@/view/download'
import moveView from '@/view/move_view'
// import Label from '@/view/detail/labelDetails'
// import Business from '@/view/detail/businessDetails'
// import About from '@/view/about'
// import onePage from '@/view/detail/labelPage/onePage'
// import twoPage from '@/view/detail/labelPage/twoPage'
// import threePage from '@/view/detail/labelPage/threePage'
// import fourPage from '@/view/detail/labelPage/fourPage'
// import aboutDetails from '@/view/about/aboutDetails'

const router = new Router({
  mode: 'history',
  // mode: 'hash',
  routes: [{
      path: '/',
      //redirect: '/home',
      //path: '/home',
      component: Home,
      meta: {
        title: 'OpenGADL'
      }
    },
    // {
    //   path: '/home',
    //   component: Home,
    //   meta: {
    //     title: 'OpenGADL'
    //   }
    // },
    {
      path: '/documention',
      component: documention,
      meta: {
        title: '使用文档'
      }
    },
    {
      path: '/move_view',
      component: moveView,
      meta: {
        title: '使用文档'
      }
    },
    {
      path: '/download',
      component: download,
      meta: {
        title: '软件下载'
      }
    }
    // {
    //   path: '/label',
    //   component: Label,
    //   meta: {
    //     title: '标签管理系统'
    //   }
    // },
    // {
    //   path: '/label/onePage',
    //   component: onePage,
    //   meta: {
    //     title: '建立3D模型'
    //   }
    // },
    // {
    //   path: '/label/twoPage',
    //   component: twoPage,
    //   meta: {
    //     title: '智能标签设计器'
    //   }
    // },
    // {
    //   path: '/label/threePage',
    //   component: threePage,
    //   meta: {
    //     title: '标签多场景应用方案'
    //   }
    // },
    // {
    //   path: '/label/fourPage',
    //   component: fourPage,
    //   meta: {
    //     title: '标签生产制作及检验'
    //   }
    // },
    // {
    //   path: '/business',
    //   component: Business,
    //   meta: {
    //     title: '印刷管理系统'
    //   }
    // },
    // {
    //   path: '/about',
    //   component: About,
    //   meta: {
    //     title: '关于我们'
    //   }
    // },
    // {
    //   path: '/aboutDetails',
    //   component: aboutDetails,
    //   meta: {
    //     title: '关于我们'
    //   }
    // }
  ]
})

export default router